import { get, post } from './http'
import { EPROTO } from 'constants';
// export const apiAddress = p => post('api/v1/users/my_address/address_edit_before', p);
//  获取侧边栏 导航内容
export const d =  p  => get('/queryAllProvinceJSON')
export const NavBar = p => get('/getMenu',p)
// 登录接口
export const loginSubmit = p => post('/login_sys',p)
// 首页 1.1.0 统计
 export const homeStatics = p => get('/index/count',p)
//  订单统计曲线图
export const getOrderLine = p => get('/index/order_curves',p)
// 销售统计曲线图 
 export const getSellLine = p => get('/index/sell_curves')
// 2.1.1 用户列表 
export const getUser = p => get('/admin/list',p)
// 2.1.1 新增
export const addUser = p => post('/admin/insert',p)
// 2.1.2 新增-获取角色列表
export const adminRoleList = p => get('/admin/roleList',p)
// 2.1.3 获取用户列表
export const adminList = p => get('/admin/list',p)
// 2.1.4 删除用户
export const delAdmin = p => post('/admin/delete',p)
// 2.1.5 修改用户
export const updateAdmin = p => post('/admin/update',p)
// 2.1.6 禁用 启用
export const updateAdminStatus = p => get('/admin/update_status',p)
// 2.2.1  添加角色
export const addRole = p => post('/role/add',p)
// 2.2.2  修改角色
export const updateRole = p => post('/role/update',p)
// 查询角色
export const getRoleList = p  =>  get('/role/list',p)
// 删除角色
export const delRole = p => post('/role/delete',p)
// 获取角色 权限菜单
 export const role_menu = p  => get('/getMenuTree',p)
//  权限保存问题
 export const save_role_menu = p => post('/updateMenu',p)
// 启/禁用角色
export const updateStatus = p => post('/role/update_status',p)
// 养殖户列表 
//  3.1.1 获取供货商列表
export const farmerList = p => get('/farmer/list',p)
//  3.1.3 获取供货商 详情 
 export const farmerDetail  = p => get('/farmer/detail',p)

 //2.1.4供货商详情中认证信息修改
 export const farmerUpdata = p => post('/farmer/editInfo',p)
  //   养殖户可选择站点的列表
  export const selectSites = p => get('/farmer/selectSites',p)
  // 设置养殖户站点
   export const setFarmerSite = p => post('/farmer/setSite',p)
//   3.1.4 认证成功 接口
 export const  approveSuccess = p => post('/farmer/auth_success' ,p)
//   3.1.5 认证失败 接口
 export const approveFail = p => post('/farmer/auth_fail',p)
// 3.1.2 获取养殖户-养殖基地 
export const farmer_base = p => get('/farmer/selectBase',p)
// 3.2.0 获取商户列表
 export const merchant_list = p => get('/merchant/list',p)
//  3.2.1 获取商户详情 
 export const merchant_detail = p => get('/merchant/detail',p)
//  3.2.1.1获取商户详情的修改
export const merchantUpdata = p => post('/merchant/editInfo',p)
//3.2.1.2 商户验证码接口
export const merchantInvoteCode = p => get('/isExistInviteCode',p)
// 运输员
// 3.3.1 新增运输员
export const addTransUser = p => post('/transUser/add',p)
// 3.3.2 获取运输员列表 
export const TransList = p => get('/transUser/list',p)
// 3.3.3 删除运输员 
export const delTrans = p => post('/transUser/delete',p)
// 3.3.4 启用 禁用运输员 
export const status_trans = p => post('/transUser/status',p)
// 3.3.5 运输员详情 
export const trans_detail = p => get('/transUser/detail',p)
// 3.3.6 获取运输员订单列表 
export const trans_order = p => get('/transUser/order',p)
// 3.3.6.1 获取运输员详情里面的重置密码
export const trans_reMima = p => post('/transUser/resetPassword',p)
// 3.4.1 获取配送员列表
 export const deliverList = p => get('/userDelivery/list',p)
//  3.4.2 新增配送员
 export const addDeliver = p => post('/userDelivery/add',p)
//  3.4.3 删除配送员
 export const delDeliver = p => post('/userDelivery/delete',p)
//  
//  3.4.4 启用 禁用配送员
 export const changeDeliverStatus = p => post('/userDelivery/update_status',p)
//  3.4.5 获取配送员详情
  export const deliverDetail = p => get('/userDelivery/detail',p)
  // 3.4.6 配送员按月统计
  export const deliverCount = p => get('/userDelivery/order',p)
  // 3.4.7  新增配送员 所属服务区 
  export const serviceZone = p => get('/query_all_serviceZone',p)
  // 3.4.8 配送员详情中的重置密码
  export const deliveryZone = p => post('/userDelivery/resetPassword',p)
//  3.4.9已分配配送员列表
export const alreayOrderList = p => get('/order/distributed_Trans',p)
// 3.4.10已分配配送员中的重新分配
export const againDelliver= p => get('/order/batch_transUser',p)
  // 根据省 查询 市区 

// 4.1 新增养殖基地
export const add_base = p => post('/base/insert',p)
// 4.2 基地列表查询 
export const baseList = p => get('/base/list',p)
// 4.3 删除基地
export const delBase = p => post('/base/delete',p)
// 4.4 编辑基地 数据回显
export const baseById = p => get('/base/baseInfo',p)
// 4.5 编辑基地提交保存
export const update_base = p => post('/base/update',p)
//  设置取消默认基地
 export const update_baseStatus = p => post('/base/setDefault',p)
// 5.1 获取订单列表 
export const orderList = p => get('/order/list',p)
// 5.2 获取订单详情
export const order_detail = p =>  get('/order/detail',p)
// 5.3 修改收货地址
export const update_adress = p => post('/order/modifyAddress',p)
// 退款接口
 export const refundOpreate = p => post('/order/refund',p)
//  确认收货接口
 export const makeReceive = p => post('/order/confirmReceipt',p)
// 全部订单order/AllOrderList
export const allOrder = p => get('/order/AllOrderList',p)

// 站点列表 
 export const siteList = p => get('/site/list',p)
//  删除站点
 export const delSite = p => post('/site/delete',p)
//  编辑站点
 export const editSite  = p => post('/site/update',p)
//  站点详情里面的站点 统计
 export const siteCount = p => get('/site/count',p)
//  banner 管理 
  export const bannerList = p =>  get('/banner/list',p)
//   删除banner
  export const delBanner = p => post('/banner/delete',p)
//   添加banner /banner/insert 
   export const addBanner  = p => post('/banner/insert',p)
//    上传图片 
    export const uploadImg = p => post('/banner/uploadPics_Base64',p)
//    获取banner 详情 
   export const bannerDetail = p => get('/banner/detail',p)
//   编辑banner
   export const update_banner = p => post('/banner/update',p)
//   启用 禁用 banner
 export const updateBannerStatus = p => post('/update_banner_status',p)
//  查询内容是否存在
 export const isHaveContent = p => get('/content/have_Content',p)
//   添加养殖户服务条款
 export const addFarmerService = p => post('/content/add_Farmer_statement',p)
//  编辑养殖户服务条款
 export const updata_farmerService = p => post('/content/edit_Farmer_statement',p)
//  添加商户服务条款
  export const addMerchantService = p => post('/content/add_merchant_statement',p)
//   编辑商户服务条款  
  export const updata_merchantService = p => post('/content/edit_merchant_statement',p)


  // 待分配 运单  
  export const   ordering = p => get('/order/Required_Trans',p)
  // 待分配运单中 获取所有的站点
   export const getSiteAll = p => get('/site/selectList')
 
  //  查询所有司机
   export const   transUserList = p => get('/select/trans_user')
  // 待分配 配送单
    export const   Required_delivery  = p => get('/order/Required_delivery',p);
    //  批量分配运输员 / 单个 分配 
    export const  order_trans = p => post('/order/batch_transUser',p)
    // 已分配配送订单列表
    export const  order_distributed = p => get('/order/distributed_delivery',p)
    //  分配配送员 
    export const order_deliver = p => get('/delivery/select_location',p)
    //  批量给订单分配配送员
     export const select_deliver = p => post('/order/batch_delivery',p)
     
     export const get_deliver_all = p => get('/delivery/select_location',p)
     



    // 运输管理模块
    //  6.1.1 新增站点 查找所属养殖基地下拉框 3.1.2 获取养殖户-养殖基地 
    //  6.1.2 新增站点 保存
     export const addSite = p =>  post('/site/insert',p)
    //  6.1.3 通过id 查找站点详情
     export const siteDetail = p => get('/site/detail',p)



    //  财务管理
    //  9.1.0 查询交易列表
     export const tradeList = p => get('/walletRecordDh/getWalletRecordDh',p)
    //  9.1.1 交易详情
     export const tradeDetail = p => get('/walletRecordDh/getWalletRecordByIdDh',p)
    //  9.2.0 获取提现列表
     export const  withdrawList = p => get('/withdrawListDh/getWithdrawTableDh',p)
    //  9.2.1 提现详情
     export const withdrawDetail = p => get('/withdrawListDh/getWithdrawDetails',p)
    //  9.2.2 提现操作
     export const withOperate =  p => post('/withdrawListDh/updateWithDraw',p)
    //  获取认证统计
     export const approveC = p => get('/countAuth',p);
    //  9.3.1订单服务费统计
     export const countOrderService = p => get('/countOrderService',p)
      
    // 9.3.2 提现服务费统计 
      export const countWithDrawService = p => get('/countWithDrawService',p)
    // 9.4.1 订单统计
    export const orderCounte = p => get('countOrder/getOrderCountList',p)
    //9.4.1 订单统计详情
    export const orderCounte_datail = p => get('countOrder/OrderCountDetail',p)
    //  服务费认证设置
     export const setFee = p => post('/sysParamsDh/setMerchantAndFarmerServiceFee',p)
    // 获取内容参数
     export const get_fee = p => get('/sysParamsDh/getMerchantAndFarmerServiceFee');
     

    //  参数设置页面  新增规格
     export const addSize = p => post('/sysGoodsizeDh/insertSysGoodSizeDh',p)
    //  获取基地规格所有参数  
     export const getSizeParams = p => get('/sysGoodsizeDh/getSysGoodSizeByBaseIdDh',p)
     export const UpdataSort = p => post('/sysGoodsizeDh/updateSort',p)
    //  更新基地规格参数接口
     export const updateSizeParams = p => post('/sysGoodsizeDh/updateSysGoodSizeByIdDh',p)
    //  删除龙虾基地规格
     export const delSizeParams = p =>post('/sysGoodsizeDh/deleteSysGoodSizeByIdDh',p)
    //  新增龙虾每日价格
     export const addPriceToday = p => post('/sysDailyPriceDh/insertSysDailyPriceDh',p)
    //  获取系统日志
     export const sysLog = p => get('/sysOperaterecordDh/getOperateRecordDh',p)
    //  获取操作人员下拉框
     export const getoprateP = p => get('/sysOperaterecordDh/getOperator',p)
    //  获取龙虾规格
     export const  paramsSize = p => get('/sysGoodsizeDh/getGoodsSizeByBaseId',p) 
    //  修改龙虾每日价格
     export const updatesizeDay = p => post('/sysDailyPriceDh/updateSysDailyPriceByIdDh',p)
    //  获取龙虾每日价格
     export const   priceDay = p => get('/sysDailyPriceDh/getDailySizeByBaseIdAndSizeIdDh',p)
    // 删除龙虾每日价格
     export const  delPriceDay = p => post('/sysDailyPriceDh/deleteDailySize',p)
   
    //  基地 的 早市 晚市 时间设置
     export const setTime = p => post('/sysParamsDh/setTimeParams',p)
    //  获取时间参数
    export const getTimeParams = p => get('/sysParamsDh/getTimeParamsByBaseId',p)
 
    // 查询服务区 省
     export const get_province = p => get('/BaseServiceZone/province',p)
    //  添加服务区
     export const add_service = p => post('/set_service_zone',p)
    //  显示服务区列表
     export const serviceList = p => get('/service_zone_list',p)
    //  删除服务区
     export const delService = p => post('/delete_service_zone',p)
    //  删除某个省的服务区
      export const del_service = p => post('/delete_province_service_zone',p)
      // 编辑接口
      export const edit_service = p => post('/update_service_zone',p)

      // 开通早市晚市时间 
      export const changeSwitch = p => post('/sysParamsDh/setOpenSwitch',p)

  // 获取销售人员列表
   export const sellerList = p => get('/saleMan/list',p)
  //  新增销售人员
   export const addSeller = p => post('/saleMan/add',p)
    // 编辑销售人员
    export const editSeller = p => post('/saleMan/edit',p)
    // 启用禁用 销售人员
    export const sellerStatus = p => post('/saleMan/updateIsDelete',p)
    // 删除销售人员
    export const delSeller = p => post('/saleMan/deleteSaleMan',p)
    // 获取BD列表
    export const BDList = p => get('/saleMan/BDBindingList',p)
    export const getRundMoney = p => get('/order/getOrderRefundMoneyLimit',p)
    // 订单页面  获取是否是首单









